from models.tags import Tag
from schemas.tags import TagSchema 
 
from flask_restx import Resource
from webargs.flaskparser import use_args
from webargs import fields
from models import db
from resources.collection import Collection

co = Collection(Tag,TagSchema)

args = {'name':fields.Str(),
        'description':fields.Str()}
class TagResource(Resource):

    @co.get
    def get(self, id):
        pass
    


    @co.delete
    def delete(self,id):
        pass
    
    @use_args(args,location='json')
    @co.put
    def put(self,args,id):
        pass

class TagsResource(Resource):


    @use_args({'page':fields.Int(missing=1),'per_page':fields.Int(missing=20)},location='query')
    @co.multiget 
    def get(self,args):
        pass

    @use_args(args,location='json')
    @co.post
    def post(self,args):
        pass
